<?php
namespace Base\Controller;

use Base\Controller\HomeBaseController;

class CustomerBaseController extends HomeBaseController {
    
	protected $customerModel;
	protected $customer;
	
	function _initialize() {
		parent::_initialize();
		
		$this->checkLogin();
		$this->checkCustomerStatus();
	
		$customerId = session('CUSTOMER.id');
		if ($customerId) {
			$this->customerModel = D("Customer/Customer");
			$this->customer = $this->customerModel->where(array("id" => $customerId))->find();
		}
	}
	
}